package com;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import lombok.Data;

@Data
public class TestStream {

	private BigDecimal ttamont;
	
	public static void main(String[] args) {
		List<TestStream> list = new ArrayList<>();
		for(int i=0;i<5;i++) {
			TestStream s = new TestStream();
			s.setTtamont(new BigDecimal("-1.3"));
			list.add(s);
		}
		BigDecimal d = list.stream().map(TestStream :: getTtamont).reduce(BigDecimal.ZERO, BigDecimal::add);
		BigDecimal use = new BigDecimal("10");
		System.out.println(use.add(d));
	}
}
